import Vue from 'vue'
import VueRouter from 'vue-router'

import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      { path: '/', redirect: '/newspaper' },
      { path: '/newspaper', component: () => import('@/views/newspaper') },
      { path: '/ascending', component: () => import('@/views/ascending') },
      { path: '/card', component: () => import('@/views/card') },
      { path: '/contact', component: () => import('@/views/contact') }
    ]
  },
  {
    path: '/change_password',
    component: () => import('@/views/change_password')
  },
  {
    path: '/addEditAscending',
    component: () => import('@/views/ascending/compoments/addEdit.vue')
  },
  {
    path: '/addCard',
    component: () => import('@/views/card/addCard')
  },
  {
    path: '/login',
    component: () => import('@/views/login')
  }
]

const router = new VueRouter({
  routes
})

export default router
